﻿using System;

namespace Fujitsu.JiraAnalysis.ReplicationService.SynchronizeExceptions
{
    public class SyncException : Exception
    {
        private string ProjectName { get; set; }
        private int ProjectId { get; set; }
        private string ProjectKey { get; set; }
        private string CustomMessage { get; set; }

        protected SyncException(string message, string projectName, int projectId, string projectKey)
        {
            CustomMessage = message;
            ProjectName = projectName;
            ProjectId = projectId;
            ProjectKey = projectKey;
        }
        public override string Message
        {
            get
            {
                return string.Format("{0}\nProject '{1}' (ProjectID: {2} ; ProjectKey: {3})", CustomMessage, ProjectName, ProjectId, ProjectKey);
            }
        }
    }
}
